<?php
class region_model extends CI_Model {

    function __construct()
    {
        parent::__construct();
        
    }
    function getByParent($Parent=0)
    {
        $query = $this->db->query("
            SELECT * 
            FROM `dtb_region` 
            WHERE 
                `parent`='$Parent'
                AND `delete` is null
        ");
        return $query->result();
    }
    function gets()
    {
        $query = $this->db->query("
            SELECT * 
            FROM `dtb_region` 
            WHERE `delete` is null
            
        ");
        return $query->result();
    }
    
}
?>
